<?php
/**
* @project ApPHP Medical Appointment
* @copyright (c) 2012 ApPHP
* @author ApPHP <info@apphp.com>
* @license http://www.gnu.org/licenses/
*/

// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------

$params = array();
$params['docid']	  = isset($_GET['docid']) ? prepare_input($_GET['docid']) : '';
$params['dspecid']	  = isset($_GET['dspecid']) ? prepare_input($_GET['dspecid']) : '';
$params['schid'] 	  = isset($_GET['schid']) ? prepare_input($_GET['schid']) : '';
$params['date'] 	  = isset($_GET['date']) ? prepare_input($_GET['date']) : '';
$params['start_time'] = isset($_GET['start_time']) ? prepare_input($_GET['start_time']) : '';
$params['duration']   = isset($_GET['duration']) ? prepare_input($_GET['duration']) : '';


if(Modules::IsModuleInstalled('appointments') && ModulesSettings::Get('appointments', 'is_active') == 'yes'){
	
	draw_title_bar(_APPOINTMENT_DETAILS);
	draw_appointment_bar(1);
	
	if(Appointments::VerifyAppointment($params)){
	    Appointments::DrawAppointmentDetails($params);	
	}else{
		draw_important_message(_WRONG_PARAMETER_PASSED);
	}		
}else{
	draw_title_bar(_APPOINTMENTS);
	draw_important_message(_NOT_AUTHORIZED);
}
	
?>